<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>供应商管理系统</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <script type="text/javascript" src="assets/js/jquery-1.8.3.js"></script>
    <script>
        $(document).ready(function () {
            $("a[href='info-certification.html']").click(function (e) {
                // 关键：阻止 <a> 标签的默认跳转行为（解决“未等响应就跳转”问题）
                e.preventDefault();

                // 获取输入值（加 trim() 去除首尾空格，避免用户输入空字符）
                var account = $("#doc-ipt-email-1").val().trim();
                var password = $("#doc-ipt-pwd-1").val().trim();

                // 非空校验
                if (account === "" || password === "") {
                    alert("账号和密码不能为空！");
                    return;
                }
                $.get("/asd/login/userlogin", {
                    "account": account,
                    "password": password
                }, function (result) {
                    if (result === "登录成功") {
                        alert(result);
                        // 跳转至管理员认证页面
                        window.location.href = "info-certification.html";
                    } else {
                        alert(result); // 显示错误信息（如“账号密码错误”）
                    }
                });

            });
        });
    </script>
</head>

<body data-type="login">

<div class="am-g myapp-login">
    <div class="myapp-login-logo-block  tpl-login-max">
        <div class="myapp-login-logo-text">
            <div class="myapp-login-logo-text">
                供应商管理系统
            </div>
        </div>
        <div class="am-u-sm-10 login-am-center">
            <form class="am-form">
                <fieldset>
                    <div class="am-form-group">
                        <input type="email" class="" id="doc-ipt-email-1" placeholder="请输入账号">
                    </div>
                    <div class="am-form-group">
                        <input type="password" class="" id="doc-ipt-pwd-1" placeholder="请输入密码">
                    </div>
                    <a href="info-certification.html" style="margin-top: 20px;color:#fff;font-size:18px">
                        <div style="    width: 100%;height: 40px;text-align: center;
						border-radius: 6px;
						background: #53d192;
						border: none;
						color: #fff;
						font-size: 18px;
						line-height: 40px;margin-top: 20px;">登录
                        </div>
                    </a>
                </fieldset>
            </form>
        </div>
    </div>
</div>

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script>

</script>
</body>

</html>